<html>
<head>
    <meta charset="UTF-8">
    <title>用户管理</title>
    <style type="text/css">
        td {
            border: 1px solid red;
        }
        a {
            text-decoration: none;
        }
    </style>
</head>
<body>
    <h1>用户管理</h1>
    <h2>
        <a href="/user/dispatchUpdate">添加用户</a>
    </h2>
    <table>
        <tr>
            <th>编号</th>
            <th>账号</th>
            <th>姓名</th>
            <th>邮箱</th>
            <th>电话</th>
            <th>操作</th>
        </tr>
        <#list list as user>
            <tr>
                <td>${user.user_id}</td>
                <td>${user.user_name}</td>
                <!--为空值时不显示-->
                <td>${user.real_name!""}</td>
                <td>${user.email!""}</td>
                <td>${user.phone!""}</td>
                <td>
                    <!--把当前行的用户id传递给请求-->
                    <a href="/user/dispatchUpdate?id=${user.user_id}">更新</a>
                    <a href="/user/deleteUser?id=${user.user_id}">删除</a>
                </td>
            </tr>
        </#list>
    </table>
</body>
</html>